Skip to content

test: Add Background component rendering contract tests-#1414#1716

Open
Rakshak05 wants to merge 5 commits into
utksh1:mainfrom
Rakshak05:issue-#1414
Open

test: Add Background component rendering contract tests-#1414#1716
Rakshak05 wants to merge 5 commits into
utksh1:mainfrom
Rakshak05:issue-#1414

Conversation

@Rakshak05

@Rakshak05 Rakshak05 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Description

This Pull Request introduces unit tests for the shared visual Background component to ensure its rendering and accessibility properties remain correct and robust.

Specifically, the following changes were made:

  • Modified the wrapper in Background.tsx to include aria-hidden="true", ensuring this purely decorative visual layer is hidden from assistive technologies.
  • Created Background.test.tsx containing contract tests that verify the component renders without crashing, correctly applies custom state modifiers (active, error, idle), asserts the decorative layers are hidden, and remains independent of animation timing.

Related Issues

Closes #1414

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

How Has This Been Tested?

We validated these changes by running the unit tests using Vitest in the frontend directory:
```powershell
npx vitest run testing/unit/components/Background.test.tsx

Checklist

  • My code follows the code style of this project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.

@utksh1 utksh1 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The frontend accessibility/rendering tests are reasonable, but this PR includes unrelated backend parser_sandbox churn.\n\n1. Remove the unrelated backend/test changes.\n2. Keep this PR focused on the Background component behavior and accessibility contract only.\n\nOnce the scope is narrowed, this should be straightforward to re-review.

@utksh1 utksh1 added type:testing Testing work category bonus label area:frontend Frontend React/UI work level:beginner 20 pts difficulty label for small beginner-friendly PRs labels Jul 7, 2026
@Rakshak05 Rakshak05 requested a review from utksh1 July 10, 2026 10:40

@utksh1 utksh1 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for narrowing the frontend test scope, but this still includes unrelated changes to .github/workflows/ci.yml. Please remove the CI workflow edits and keep this PR focused on the Background component accessibility/rendering contract only.

@Rakshak05 Rakshak05 requested a review from utksh1 July 13, 2026 18:37

@utksh1 utksh1 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CI workflow change is gone, but the latest push now includes an unrelated backend edit to testing/backend/unit/test_tls_verification.py. Please remove that TLS test fix and keep this PR limited to Background.tsx plus its frontend component tests. The TLS regression belongs in its own focused PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:frontend Frontend React/UI work level:beginner 20 pts difficulty label for small beginner-friendly PRs type:testing Testing work category bonus label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[TEST] Add Background component rendering contract tests

2 participants